﻿@model ITStore.ViewModels.ChiTietSanPhamViewModel

@{
    ViewBag.Title = "Details";
}
<link href="../../Content/ITStore/css/templatemo_style.css" rel="stylesheet" type="text/css" />

<script src="@Url.Content("~/Scripts/tinymce/tiny_mce.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/tinymce/tiny_mce_popup.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/tinymce/tiny_mce_src.js")" type="text/javascript"></script>
<script type="text/javascript">
    tinyMCE.init({
        mode: "textareas"
    });
</script>
<h2>Details</h2>

<fieldset>
    <legend>SanPham</legend>

    <h2>Chi tiết sản phẩm</h2>
            <div class="col col_13">
        	<a  rel="lightbox[portfolio]" href="../../@Html.DisplayFor(model => model.ChiTietSP.sp_Hinh)" title="HP ENVY14"><img src="../../@Html.DisplayFor(model => model.ChiTietSP.sp_Hinh)" alt="Image 10" width="300" height="200"/></a>
            </div>
            <div class="col col_13 no_margin_right">
                <table>
                    <tr>
                        <td height="30" width="160">Giá:</td>
                        <td width="124"><span id="price_update_"><span id="line_discounted_price_">@Html.DisplayFor(model => model.ChiTietSP.sp_Gia) $</span></span></td>
                    </tr>
                    <tr>
                        <td height="30">Tình trạng:</td>
                        <td>Còn hàng</td>
                    </tr>
                    <tr>
                        <td height="30">Model:</td>
                        <td>@Html.DisplayFor(model => model.ChiTietSP.sp_Ten)</td>
                    </tr>
                    <tr>
                        <td height="30">Nhà sản xuất:</td>
                        <td>@Html.DisplayFor(model => model.ChiTietSP.NhaSanXuat.nsx_Ten)</td>
                    </tr>
                    <tr>
                  <td height="30">Số lượng còn:</td><td><input type="text" value="@Html.DisplayFor(model => model.ChiTietSP.sp_SoLuong)" style="width: 20px; text-align: right" /></td></tr>
                </table>
            <div class="cleaner h20"></div>
                <a href="" class="add_to_cart">@Html.RouteLink("Thêm vào giỏ hàng","Default",new{Controller = "DonHang",action="Them",id=Model.ChiTietSP.sp_ID}) </a>
			</div>
            <div class="cleaner h30"></div>
            
          <h5><strong>Thông tin về sản phẩm</strong></h5>
            <ul>
              <li>@Html.DisplayTextFor(model => model.ChiTietSP.sp_ThongTinChiTiet)</li>
            </ul>
        <div class="cleaner h50"></div>
</fieldset>
<fieldset>
<legend style="color:Blue">Bình luận</legend>
<div>
<ul>
    @foreach (var item in Model.DanhSachBinhLuan)
    {
        <li><div style="font-weight:bold">@Html.Raw(@item.blsp_NoiDung)</div><div style="font-style:italic;font-size:smaller">Ngày đăng : @item.blsp_NgayDang -- @Html.ActionLink("Xóa", "DeleteBinhLuan", new { id = @item.blsp_ID })</div></li>
    }
</ul>
</div>
</fieldset>
<br />
<div>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.PageNumber > 1)
    {
        @Html.ActionLink("<<", "Details", new { page = 1, id = Model.ChiTietSP.sp_ID })
        @Html.Raw(" ");
        @Html.ActionLink("< Lùi lại", "Details", new { page = Model.PageNumber - 1, id = Model.ChiTietSP.sp_ID})
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }
     
    @if (Model.PageNumber < Model.PageCount)
    {
        @Html.ActionLink("Tiếp theo >", "Details", new { page = Model.PageNumber + 1, id = Model.ChiTietSP.sp_ID })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "Details", new { page = Model.PageCount, id = Model.ChiTietSP.sp_ID })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
</div>
<br />
<fieldset>
<legend style="color:Blue">Thêm bình luận</legend>
@using (Html.BeginForm())
{
    <p>     
                <textarea name="content" cols="81" rows="5">Nhập nội dung bạn muốn bình luận vào đây !</textarea>
                <input type="submit" value="Bình luận" />
    </p>
}
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { /* id=Model.PrimaryKey */ }) |
    @Html.ActionLink("Back to List", "Index")
</p>
